home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 2.4 KB | 74 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Part.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef PART_H
- #define PART_H
-
- // Cyberdog 1.0b3 does not work properly when you call it from threads it did not
- // create. Since this is required for our blocking synchronous input code, we can
- // not use it until we get a newer Cyberdog. We'll be forced to use idle-time
- // input instead, which is clumsier and undesirable in general.
- #define USETHREADSFLAG 0
-
- #include "FWPart.h"
- #include "FWCyPart.h"
- #if !USETHREADSFLAG
- #include "FWIdle.h"
- #include "FWCyStrm.h"
- #endif
-
- class FW_CPresentation;
- class ODFrame;
-
- //========================================================================================
- // CLASS CPart
- //========================================================================================
-
- class CPart: public FW_CPart, public FW_MCyberPart
- #if !USETHREADSFLAG
- , public FW_CIdler
- #endif
- {
- public:
- FW_DECLARE_AUTO(CPart)
- CPart (ODPart* odPart);
- ~CPart ();
- void Initialize (Environment* ev);
- FW_CContent* NewPartContent (Environment* ev);
- FW_CFrame* NewFrame (Environment* ev, ODFrame* odFrame,
- FW_CPresentation* presentation, FW_Boolean fromStorage);
-
- void ExternalizeContent (Environment* ev, ODStorageUnit* storageUnit, FW_CCloneInfo* cloneInfo);
- void InternalizeContent (Environment* ev, ODStorageUnit* storageUnit, FW_CCloneInfo* cloneInfo);
-
- // CYBERDOG
- FW_CEventDispatcher* PrivNewEventDispatcher(Environment *ev);
- void DoSetCyberItem (Environment* ev, CyberItem* newItem, ParameterSet* parameters);
- void HandleOpenCyberItem (Environment* ev, CyberItem* item, ODPart* openerPart, ParameterSet* how);
- #if !USETHREADSFLAG
- // Read the data by polling during idles. Requires us to keep state (not
- // much - only the CyberStream*).
- FW_Boolean DoIdle (Environment* ev, const FW_CNullEvent& event);
- FW_CCyberStream fStream;
- #else
- // Read the data in a thread.
- static pascal void* LoadCyberItem (void* self_CPart);
- #endif
-
- // CONTENTDATA. A real part with more complex data would probably use a content
- // model object and have accessors and the like. A simple text viewer doesn't
- // need that.
- Handle fDownloadedText;
- private:
- FW_CPresentation* fPresentation;
- };
-
- #endif // PART_H
-
-